$(function() {
	
	$("#schoolMsg").hide();
	$("#subjectMsg").hide();
	$("#jobMsg").hide();
	$("#introMsg").hide();
	createGradeSelect(document.getElementById("gid"),"1");
	
	focusById();
	
});

function showErrMsg(id,msg){
	$("#"+id+"Msg").show();
	$("#" + id + "Tip").text(msg);
}

function hideMsg(id) {
	$("#"+id+"Msg").hide();
}

function focusById(){
	$("#school").focus(function(){
		hideMsg("school");
	});
	$("#subject").focus(function(){
		hideMsg("subject");
	});
	$("#job").focus(function(){
		hideMsg("job");
	});
	$("#intro").focus(function(){
		hideMsg("intro");
	});
}